
Partial Class Usercontrols_Controlpanel_Login
    Inherits UserControlBase

#Region " Enums, Memebers and Properties "

    Protected Item As String = "THIS IS A TEST"

#End Region

#Region " Page Events "

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
		SetPageTitle(Resources.Resource.Login)
    End Sub

#End Region

#Region " Save Data "



#End Region

#Region " Load Data "



#End Region

#Region " Form Controls Events "

    Protected Sub CreateNewAccount(ByVal sender As Object, ByVal e As CommandEventArgs)
        Response.Redirect(String.Format("{0}.aspx?pid=sec_newuser", AppPage))
    End Sub

    Protected Sub RetreivePassword(ByVal sender As Object, ByVal e As CommandEventArgs)
        Response.Redirect(String.Format("{0}.aspx?pid=sec_getpassword", AppPage))
	End Sub

	Protected Sub uxLogin_LoginError(ByVal sender As Object, ByVal e As System.EventArgs) Handles uxLogin.LoginError
		uxLogin.FailureText = Resources.Resource.UnsuccessfulLoginAttempt

		Dim user As MembershipUser = Membership.GetUser(uxLogin.UserName)

		If user IsNot Nothing Then
			If user.IsLockedOut Then
				uxLogin.FailureText = Resources.Resource.AccountLockedOut
			ElseIf Not user.IsApproved Then
				uxLogin.FailureText = Resources.Resource.AccountNotActivated
			End If
		End If
	End Sub

#End Region

#Region " Helpers and Methods "



#End Region

End Class
